package io.renren.modules.news.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import io.renren.modules.news.dao.PaomadengDao;
import io.renren.modules.news.entity.PaomadengEntity;
import io.renren.modules.news.service.PaomadengService;



@Service("paomadengService")
public class PaomadengServiceImpl implements PaomadengService {
	@Autowired
	private PaomadengDao paomadengDao;
	
	@Override
	public PaomadengEntity queryObject(Integer id){
		return paomadengDao.queryObject(id);
	}
	
	@Override
	public List<PaomadengEntity> queryList(Map<String, Object> map){

		return paomadengDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return paomadengDao.queryTotal(map);
	}
	
	@Override
	public void save(PaomadengEntity paomadeng){
		paomadeng.setCreatetime(new Date());
		paomadengDao.save(paomadeng);
	}
	
	@Override
	public void update(PaomadengEntity paomadeng){
		paomadeng.setUpdatetime(new Date());
		paomadengDao.update(paomadeng);
	}
	
	@Override
	public void delete(Integer id){
		paomadengDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		paomadengDao.deleteBatch(ids);
	}
	
}
